package com.walter.web.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;

import com.opensymphony.xwork2.ActionSupport;
import com.sun.net.httpserver.Authenticator.Success;
import com.walter.dao.PersonalDao;
import com.walter.dao.impl.PersonalDaoImpl;
import com.walter.domain.Personal;
import com.walter.domain.TeacherInfo;
import com.walter.service.PersonalService;
import com.walter.service.TeacherInfoService;
import com.walter.service.impl.PersonalServiceImpl;
import com.walter.service.impl.TeacherInfoServiceImpl;

public class PersonalAction extends ActionSupport implements ServletRequestAware{
	
	private PersonalService pService=new PersonalServiceImpl();
	private HttpServletRequest request;
	public String execute() {
		String t_id = request.getParameter("t_id");
		Long id=Long.parseLong(t_id);
		Personal p=pService.getById(id);
		request.setAttribute("personalInfo", p);
		return SUCCESS;
	}

	@Override
	public void setServletRequest(HttpServletRequest request) {
			this.request=request;		
	}

}
